<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="middle padtop10 myclear">
	<div class="page-content">
		
		<!-- bread crumb -->
		<p id="bread-crumb">
			<a href="<?php echo base_url();?>">
				<?php echo $lang['home'];?>
			</a>
			<a href="<?php echo site_url('monitor/adsOnlineMonitoring');?>">
				<?php echo $lang['online_ads_monitoring'];?>
			</a>
			<?php echo $lang['online_zone_bigdata_monioring'];?>
		</p>
		<!-- end bread crumb -->
		<h3>
			<?php echo $lang['online_zone_bigdata_monioring'];?>
		</h3>
		<br>
		<form name="frmZone" action="<?php echo site_url('monitor/zoneBigDataMonitoring/');?>" method="get">
			<p>
				zoneID: <input type="text" name="zoneid" size="30" value="<?php echo $zoneid;?>" />
				<input type="submit" value="Report" />
			</p>
			<?php if(isset($rows)){?>
			<br>
			<div>
				<p class="text-right padtop10">
					Tổng số bản ghi: <b><?php echo $records;?></b>
				</p>
				<table cellpadding="0" cellspacing="0" width="100%" border="1" class="martop10 tbl-list">
				<tr>
					<td class="td-label text-center"><strong>STT</strong></td>
					<td class="td-label text-center"><strong>ID</strong></td>
					<td class="td-label text-center"><strong>Ảnh</strong></td>
					<td class="td-label"><strong>Tiêu đề</strong></td>
					<td class="td-label text-right"><strong>CTR</strong></td>
					<td class="td-label text-right"><strong>Money Estimate</strong></td>
				</tr>
				<?php
				if(isset($rows[0]->bannerid))
				{
					$j = 1; foreach ($rows as $item){?>
				<tr>
					<td class="text-center"><?php echo ($j + $page);?></td>
					<td class="text-center"><?php echo $item->bannerid;?></td>
					<td class="text-center">
						<img src="<?php echo $item->filename;?>" border="0" />
					</td>
					<td><?php echo $item->bannername;?></td>
					<td class="text-right"><?php echo $item->ctr;?></td>
					<td class="text-right"><?php echo number_format($item->money_estimate);?></td>
				</tr>
				<?php
					$j++;
					}	//end for
				}	//end if
				?>
				<tr>
					<td class="td-label text-right" colspan="6">
						<?php
						if(isset($page_link))
							echo $page_link.' &nbsp;|&nbsp; <a href="'.site_url('monitor/zoneBigDataMonitoring/?zoneid='.$zoneid.'&limit=all').'">All</a>';
						else
						{
							echo '<a href="'.site_url('monitor/zoneBigDataMonitoring/?zoneid='.$zoneid).'">Pages</a>';
							echo '<input type="hidden" name="limit" value="all" />';
						}
						?>
					</td>
				</tr>
			</table>
			</div>
			<?php } else echo '<br>Not found data';?>
		</div>
	</form>
</div>
<br><br>